<#-- Macro define --
-- @author pzp
-- @date 2015-11-19
-->

<#macro PrintcsTime printDate printTime>
convert(datetime, cast(${printDate}/10000     as varchar)+'-'+
	cast(${printDate}%10000/100 as varchar)+'-'+
	cast(${printDate}%100       as varchar)+' '+
	cast(${printTime}/10000     as varchar)+':'+
	cast(${printTime}%10000/100 as varchar)+':'+
	cast(${printTime}%100       as varchar))
</#macro>

<#macro PrintcsType col>
	case ${col}
	when 131073 then 'P'
	when 131074 then 'C'
	when 131076 then 'S'
	else 'S' end
</#macro>

<#macro PrintcsPaper col>
	case ${col}
	when 8 then 'd' 
	when 9 then 'e' 
	when 12 then 'E' 
	when 13 then 'F'
	else 'O' end
</#macro>